package com.dlyk.mapper;

import com.dlyk.bean.TTran;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;

@Mapper
public interface TTranMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TTran record);

    int insertSelective(TTran record);

    TTran selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TTran record);

    int updateByPrimaryKey(TTran record);

    /**
     * 查询成功交易额
     * @return
     */
    BigDecimal selectSuccessTranAmount();

    /**
     * 查询总交易额
     * @return
     */
    BigDecimal selectTranAmountCount();

    /**
     * 查询交易总数
     * @return
     */
    int selectByTotalTranCount();

    /**
     * 查询交易成功的数量
     * @return
     */
    int selectBySuccessTotalTranCount();
}